#ifndef __LIST_H__
#define __LIST_H__

#include "../common/debug.h"

//thanks to linux kernel
#define for_each_list_entry(cur, l) \
	for (	cur = (l)->head; \
			cur != NULL; \
        	cur = cur->next)

typedef struct list_element {
	void *object;
	struct list_element *next;
} list_element;

typedef struct {
	list_element *head;
} list;

list_element* add_object(list*, void*);
void* get_next_object(list*);
int get_size(list*);
void delete_object(list*, void*);


#endif
